<?php


namespace App\Lib\Consul;

/**
 * Class AbstractService
 * @package App\Lib\Consul
 */
abstract class AbstractService
{


    /**
     * 服务前缀默认为公共
     * @var string
     */
    protected $servicePrefix = 'Common';

    /**
     * 服务名
     * @var string
     */
    protected $serviceName = '';

    /**
     * @return string
     */
    public function getServicePrefix(): string
    {
        return $this->servicePrefix;
    }

    /**
     * @param string $servicePrefix
     * @return AbstractService
     */
    public function setServicePrefix(string $servicePrefix)
    {
        $this->servicePrefix = $servicePrefix;
        return $this;
    }

    /**
     * @return string
     */
    public function getServiceName(): string
    {
        return $this->serviceName;
    }

    /**
     * @param string $serviceName
     * @return AbstractService
     */
    public function setServiceName(string $serviceName)
    {
        $this->serviceName = $serviceName;
        return $this;
    }
}
